package com.sk.bilibili.model.activity;

import android.content.Intent;
import android.os.Handler;
import android.os.Looper;
import android.view.View;
import android.widget.TextView;

import com.sk.api.annotations.Autowired;
import com.sk.bilibili.R;
import com.sk.bilibili.bean.Member;
import com.sk.bilibili.callBack.RequestCallBack;
import com.sk.bilibili.mapper.FocusMapper;
import com.sk.bilibili.mapper.MemberMapper;
import com.sk.bilibili.model.BaseModel;
import com.sk.bilibili.other.BiliBiliProperty;
import com.sk.bilibili.other.JsonMap;
import com.sk.bilibili.utils.DataUtils;
import com.sk.bilibili.utils.PreferenceUtils;
import com.sk.bilibili.utils.RequestUtils;
import com.sk.bilibili.utils.ViewUtils;
import com.sk.bilibili.view.activity.FlashActivity;
import com.sk.bilibili.view.activity.MemberActivity;

public class MemberModel extends BaseModel<MemberActivity> {

    @Autowired
    MemberMapper memberMapper;
    @Autowired
    FocusMapper focusMapper;

    public void loadMember(Integer id) {
        RequestUtils.process(memberMapper.getMember(id), member -> {
            view.loadMemberSuccess(member);
        });
    }

    public void switchFocus(Integer id) {
        RequestUtils.process(focusMapper.switchFocus(id),
                focus -> view.switchFocusSuccess(focus));
    }

}